Compilers are large, complex software programs typically constructed to translate software code written in a first language into code written in a different language. Typically, compilers are used to translate code written in a high-level language, such as C, C++, JAVA ALGOL, or some other type of high level object-oriented language into a lower level language, such as machine language, for execution on a particular computing system having a known instruction set architecture.
Translation accuracy is a critical feature of any compiler, since even slight differences in the compiler's treatment of syntax my have a drastic effect on the overall output of the compiler. Furthermore, differences may exist in compiler versions that would result in differences in resulting object code that is to be executed, even when receiving the same source code. This is to be expected; however, it is understood that if the compiler executes properly, the overall effect of the resulting object code will be the same regardless of the compiler version used.
In view of the differences in compiler output that are expected in different compiler versions, it can be difficult to validate proper output of a compiler. Furthermore, compilers generally include a large number of different types of procedures, and it can be difficult to ensure that each compiler procedure has been fully validated if a user were forced to write test code targeting each compiler procedure. Even if this were feasible, there may be cases where interrelationships between instructions cause an unforeseen compilation issue due to the way syntax of particular instructions is parsed, and which therefore would not be detected by manually-developed compiler tests.
Many of these issues are avoided when compiler code changes relatively slowly, for example where there is little change to a compiler's expected output over time. However, in cases where a compiler has undergone heavy revision (e.g., over about 10-30% of the compiler code being re-written or revised), substantial validation of all or most of the compiler's operation is required.
In addition, when a compiler's code base has changed to a great extent, it may also be due to changes in an execution architecture of an associated microprocessor or execution engine that is the target of that compiler. In such cases, it may be difficult to detect exactly where the source of error occurs between the compiler and the associated microprocessor or execution engine.
For these and other reasons, improvements are desirable.